package yf.mall.dao;

import yf.mall.entity.CouponEntity;
import yf.mall.vo.CouponVo;
import org.apache.ibatis.annotations.Mapper;
import com.yf.dao.BaseDao;
import java.util.List;
/**
 * 卡券Dao
 *
 * @author hxf
 * @email 505860922@qq.com
 * @date ${datetime}
 */
@Mapper
public interface CouponDao extends BaseDao<CouponEntity> {

    List<CouponVo> findVo(CouponVo vo);

    CouponVo getVo(Long id);


    //订单产生的券
    List<CouponEntity> findByFromOrderNo(String orderNO);

    //订单使用的券
    List<CouponEntity> findByUserOrderNo(String orderNO);

    List<CouponEntity> findByUserId(Long userId);

}
